package com.naodong.shenluntiku.mvp.contract;

import com.naodong.shenluntiku.mvp.model.bean.BaseBean;
import com.naodong.shenluntiku.mvp.model.bean.StudySet;

import io.reactivex.Observable;
import me.shingohu.man.intergation.retrofit.NoBodyEntity;
import me.shingohu.man.mvp.IModel;
import me.shingohu.man.mvp.IView;

/**
 * Created by Administrator on 2017/5/30.
 */

public interface StudySetContract {

    interface View extends IView {
        void onStudySet(StudySet studySet);
        void onUpdateStudySet(String type,int isChosen,String value);
        void onUpdateStudyFail();
    }

    //Model层定义接口,外部只需关心model返回的数据,无需关心内部细节,及是否使用缓存
    interface Model extends IModel {
        Observable<BaseBean<StudySet>> getStudySet();
        Observable<NoBodyEntity> updateStudySet(String type,int isChosen,String value);
    }
}
